//
//  NSArray+LLHelper.m
//  LLFoundation
//
//  Created by my_liu on 2016/11/14.
//  Copyright © 2016年 . All rights reserved.
//

#import "NSArray+LLHelper.h"

@implementation NSArray (LLHelper)

- (NSString *)n_toJSONString
{
    NSError *error = nil;
    if (!self) {
        return nil;
    }
    NSData *data  = [NSJSONSerialization dataWithJSONObject:self options:NSJSONWritingPrettyPrinted error:&error];
    
    
    if (!error) {
        
        NSString *jsonString = [[NSString alloc] initWithData:data
                                                     encoding:NSUTF8StringEncoding];
        return jsonString;
    }
    else
    {
        return nil;
    }
}
@end
